Skip to content

refactor(@angular/build): add debug logging to Vitest executor#32612

Merged
clydin merged 1 commit intoangular:mainfrom
clydin:vitest/debug-logging
Mar 3, 2026
Merged

refactor(@angular/build): add debug logging to Vitest executor#32612
clydin merged 1 commit intoangular:mainfrom
clydin:vitest/debug-logging

Conversation

@clydin
Copy link
Member

@clydin clydin commented Feb 26, 2026

This commit introduces a multi-level debug logging system within the Vitest test runner's executor. This logging is intended to aid in troubleshooting internal issues and provide deeper insights into the test execution process.

Logging is controlled by the NG_TEST_LOG environment variable, which accepts numeric levels (0 for off, 1 for debug, 2 for verbose). Crucial lifecycle events and state changes in the VitestExecutor are now logged, such as constructor instantiation, build result processing (full and incremental), test re-run specifications, Vitest initialization details (including browser configuration, external configuration path, and included files), and executor disposal. These logs are guarded by the logLevel to prevent any performance penalties during normal execution. Furthermore, specific areas like incremental run file mappings and external dependency metadata are logged at a verbose level.

@clydin clydin added the target: patch This PR is targeted for the next patch release label Feb 26, 2026
@clydin clydin force-pushed the vitest/debug-logging branch from e57821a to bae8feb Compare February 26, 2026 19:55
@clydin clydin added the action: review The PR is still awaiting reviews from at least one requested reviewer label Feb 26, 2026
@clydin clydin requested a review from alan-agius4 February 26, 2026 20:11
This commit introduces a multi-level debug logging system within the Vitest test runner's executor. This logging is intended to aid in troubleshooting internal issues and provide deeper insights into the test execution process.

Logging is controlled by the `NG_TEST_LOG` environment variable, which accepts numeric levels (0 for off, 1 for debug, 2 for verbose). Crucial lifecycle events and state changes in the `VitestExecutor` are now logged, such as constructor instantiation, build result processing (full and incremental), test re-run specifications, Vitest initialization details (including browser configuration, external configuration path, and included files), and executor disposal. These logs are guarded by the `logLevel` to prevent any performance penalties during normal execution. Furthermore, specific areas like incremental run file mappings and external dependency metadata are logged at a verbose level.
@clydin clydin force-pushed the vitest/debug-logging branch from bae8feb to b2205b8 Compare March 2, 2026 17:37
@clydin clydin requested a review from alan-agius4 March 2, 2026 17:54
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Mar 3, 2026
@clydin clydin merged commit 2887d84 into angular:main Mar 3, 2026
62 of 63 checks passed
@clydin
Copy link
Member Author

clydin commented Mar 3, 2026

This PR was merged into the repository. The changes were merged into the following branches:

@clydin clydin deleted the vitest/debug-logging branch March 3, 2026 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: @angular/build target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants